package model;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;

import view.BoundBox;


public class DrawText extends DrawObject 
{

	public DrawText(String tmpL) 
	{		
		String [] tokens = tmpL.split("\"");
		
		String [] param1 = tokens[0].split(" ");
		String [] param2 = tokens[2].split(" ");
		
		
		this.type = param1[0].charAt(0);
		this.setX1( new Integer(param1[1]) );
		this.setY1( new Integer(param1[2]) );
		this.setHeight( new Integer(param1[3]) );
		
		this.setText( tokens[1] );
		
		this.setRed( new Integer(param2[1]) );
		this.setGreen( new Integer(param2[2]) );
		this.setBlue( new Integer(param2[3]) );
	}
	
	
	public DrawText(DrawObject obj)
	{
		super (obj);
	}


	@Override
	public String toString()
	{
		String tmp = new String();
		
		tmp = 			this.type 
				+ " " + this.getX1()
				+ " " + this.getY1()
				+ " " + this.getHeight()
				+ " " + "\"" + this.getText() + "\""
				+ " " + this.getRed()
				+ " " + this.getGreen()
				+ " " + this.getBlue();
		
		return tmp;
	}


}
